package com.newsee.remote.budget.controller;


import com.alibaba.fastjson.JSONObject;
import com.newsee.remote.budget.service.IShSapbudgetinfoService;
import com.newsee.remote.common.dto.budget.BudgetDTO;
import com.newsee.remote.common.vo.budget.BudgetVO;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 预算科目前端控制器
 * </p>
 *
 * @author liangzhichen
 * @since 2019-11-06
 */
@Slf4j
@RestController
@RequestMapping("/sap/budget")
public class ShSapbudgetinfoController {

    private final IShSapbudgetinfoService iShSapbudgetinfoService;

    public ShSapbudgetinfoController(IShSapbudgetinfoService iShSapbudgetinfoService) {
        this.iShSapbudgetinfoService = iShSapbudgetinfoService;
    }

    @ApiOperation(value = "接收预算预算科目数据相关接口")
    @PostMapping
    public BudgetVO acceptSapBudget(@RequestBody BudgetDTO budgetDTO) {
        log.info("接收预算预算科目数据接口信息：" + budgetDTO.toString());
        return iShSapbudgetinfoService.acceptSapBudget(budgetDTO);
    }


}
